<?php
namespace app\admin\controller;

use think\Request;

class Index extends Base {

    /**
     * 后台框架
     * @return \think\response\View
     */
    public function index() {
        return view();
    }

    /**
     * @desc 首页展示信息
     * @return \think\response\View
     */
    public function main() {
        $today = date('Y-m-d');
        /**
         * 用户数据统计
         */
        $todayUserCount = model('User')->where('user_create_time', 'like', $today.'%')->count();
        $userCount = model('User')->count();
    
        $this->assign([
            //用户数据
            'todayUserCount'       => $todayUserCount,
            'userCount'            => $userCount,
        ]);
        return view();
    }
}
